<?php
/*
 * [JINYUN!] (C)2001-2099 Jinyunweb.com
 * This is NOT a freeware, use is subject to license terms
 * $Id: 2017-12-13 03:39:35 apple $
 插件菜单
*/
defined('BY_JYA') or exit('error');
list($basicname)=$arguments;
// 是主应用时的菜单
// 辅助应用时的菜单
$menus2=array(
	array(
		'title'=>'互动营销','isplugin'=>0,'icon'=>'fa-users','url'=>'/index//basicname='.$basicname,'child'=>array(
			array('title'=>'活动概况','child'=>array(
				array('url'=>'jy_h5game/index//basicname='.$basicname,'title'=>'活动概况'),
				//array('url'=>'jy_h5game/basic.module_home/cover/ac=index&type=3','title'=>'活动入口'),
			)),
			array('title'=>'活动管理','child'=>array(
				array('url'=>'list/','title'=>'活动列表'),
				array('url'=>'opt/','title'=>'投票选项列表'),
				array('url'=>'hexiao/','title'=>'核销列表'),
				array('url'=>'redpacker/','title'=>'红包列表'),
				array('url'=>'award/','title'=>'获奖名单'),
				array('url'=>'hdgame/','title'=>'活动市场'),
				array('url'=>'tohexiao/','title'=>'前往核销'),
				array('url'=>'cert/','title'=>'证书上传'),
			)),
		)
	)
);

// 小应用可以不设置主菜单
if(empty($basicname)){
	$menus =$menus1?$menus1:$menus2;
	return $menus ;
}else{
	if (method_exists($this->plugin($basicname),'getmenus')){
		$basicmens = $this->plugin($basicname)->getmenus();
		if(!empty($basicmens)){
			foreach($basicmens as &$v){
				if($v['isplugin'] == 1){
					$v=$menus2[0];
				}
			}
		}
		return $basicmens;
	}
}

